package com.example.edu.themechange;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class SecondActivity extends AppCompatActivity {
 private int theme;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        theme=getIntent().getIntExtra("theme",0);
        this.setTheme(theme);
        Log.i("TAG", "onCreate:.. "+theme);
        setContentView(R.layout.activity_second);
    }
    public void onclick(View view){
        Intent intent=new Intent(this,ThirdActivity.class);
        intent.putExtra("theme",theme);
        Log.i("TAG", "onclick: "+theme);
        startActivity(intent);
    }
}
